<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>01-swiper插件基本使用</title>
  <!-- 🎯1. 手写：引入插件的 css 文件，注意引入带 bundle 单词的  -->
  <link rel="stylesheet" href="./swiper8/swiper-bundle.css">
  <!-- 🎯2. 手写：引入插件的 js 文件，注意引入带 bundle 单词的  -->
  <script src="./swiper8/swiper-bundle.js"></script>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    /* 5. 手写：按项目情况修改样式 */
    .mySwiper {
      height: 520px;
      background-color: pink;
    }
  </style>
</head>

<body>
  <div class="swiper mySwiper">
    <div class="swiper-wrapper">
      <div class="swiper-slide">
        <img src="./images/01.jpg" alt="">
      </div>
      <div class="swiper-slide">
        <img src="./images/02.jpg" alt="">
      </div>
      <div class="swiper-slide">
        <img src="./images/03.jpg" alt="">
      </div>
    </div>
    <div class="swiper-button-next"></div>
    <div class="swiper-button-prev"></div>
    <div class="swiper-pagination"></div>
  </div>
  <!-- Initialize Swiper -->
  <script>
    var swiper = new Swiper(".mySwiper", {
      slidesPerView: 1,
      spaceBetween: 30,
      loop: true,
      pagination: {
        el: ".swiper-pagination",
        clickable: true,
      },
      navigation: {
        nextEl: ".swiper-button-next",
        prevEl: ".swiper-button-prev",
      },
    });
  </script>
</body>

</html>